namespace WorkflowApi.Models
{
    // 并行步骤请求
    public class ParallelStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string ParallelRule { get; set; } = "all";
        public List<ParallelBranch> ParallelBranches { get; set; } = new();
    }

    public class ParallelBranch
    {
        public string Name { get; set; } = "";
        public List<WorkflowStep> Steps { get; set; } = new();
    }

    // 脚本步骤请求
    public class ScriptStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string ScriptType { get; set; } = "javascript";
        public string ScriptContent { get; set; } = "";
        public int Timeout { get; set; } = 30;
        public string ErrorHandling { get; set; } = "continue";
    }

    // 邮件步骤请求
    public class EmailStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string Subject { get; set; } = "";
        public string Body { get; set; } = "";
        public List<string> Recipients { get; set; } = new();
        public List<string> CcRecipients { get; set; } = new();
    }

    // 定时器步骤请求
    public class TimerStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string Schedule { get; set; } = "0 9 * * *";
        public string TimerType { get; set; } = "cron";
    }

    // 等待步骤请求
    public class WaitStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string WaitTime { get; set; } = "5m";
        public string WaitType { get; set; } = "fixed";
    }

    // Webhook步骤请求
    public class WebhookStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string Url { get; set; } = "";
        public string Method { get; set; } = "POST";
        public Dictionary<string, string> Headers { get; set; } = new();
        public string Body { get; set; } = "";
    }

    // 通知步骤请求
    public class NotificationStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string NotificationType { get; set; } = "sms";
        public string Message { get; set; } = "";
        public List<string> Recipients { get; set; } = new();
    }

    // 子流程步骤请求
    public class SubprocessStepRequest
    {
        public string Name { get; set; } = "";
        public int Order { get; set; }
        public Position Position { get; set; } = new();
        public string SubprocessId { get; set; } = "";
        public Dictionary<string, object> Parameters { get; set; } = new();
    }
} 